package com.wyw.design.model.learning.behavioral.strategy;

import java.util.List;

/**
 * @Title   上下文角色
 * @Description
 * @Author Mr Wu yewen.wu.china@gmail.com
 * @Date 2023/4/19 16:41
 * Update History:
 * Author        Time            Content
 */
public class StringSortContext {
    private IStringSortStrategy strategy;

    public StringSortContext(IStringSortStrategy strategy) {
        this.strategy = strategy;
    }

    // 获取排序结果
    public List<String> getSortList(List<String> list) {
        return this.strategy.sort(list);
    }
}
